package com.wcarmon.life.model {

	import mx.collections.*;
	import com.adobe.cairngorm.model.*;
	import com.wcarmon.life.vo.*;
	import com.wcarmon.utils.*;
	import flash.system.*;
	import mx.logging.*;
	import mx.logging.targets.*;
	import mx.core.*;
	import com.wcarmon.life.view.*;
	import mx.resources.*;
	

	[Bindable]
	public class LifeModelLocator implements ModelLocator {

		private var log : ILogger = Log.getLogger("com.wcarmon.life.model.LifeModelLocator");
		
		include "../../../version.as";

		include "includes/ModelConstants.as";
		include "includes/ModelImages.as";
		include "includes/ModelVariables.as";
		include "includes/ModelFunctions.as";
		





		//////////////////////////////////////////////////////////////////////
		private static var model : LifeModelLocator;

		public function LifeModelLocator() : void {
			if ( LifeModelLocator.model != null ){
				throw new Error( "Only one ModelLocator instance should be instantiated" );
			}
			initObjects();
		}

		// singleton: always returns the one existing static instance to itself
		public static function getInstance() : LifeModelLocator {
			if ( model == null ){
				model = new LifeModelLocator();
			}
			return model;
		}
	}
}
